{
    // literal type 字面量类型
    // https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types
    type c = 'hello literal';
    type num = 12;
    type flag = true;
    type sym = symbol;

    const c1: c = 'hello literal';
    const num1: num = 12;
    const sym1: sym = Symbol('id');

    // template literal types 模板字面量类型
    // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html

    type str = `hello template literal type, my name is ${string}`;

    type empNo = `emp no is ${number}`

    type empId = `ck is man ? ${boolean} : false`

    type allInfo = `ck no is ${number | string}`


    const str1: str = `hello template literal type, my name is ck`;// 只能是str
    const empNo1: empNo = `emp no is 007` // 只能是数值
    const empId1: empId = `ck is man ? true : false` // 只能是boolean值
    const allInfo1: allInfo = 'ck no is nanjin 007' // 可以是boolean和string

    // 模板字符串 和 never，结果仍然是never
    // 等同于string & never => never
    type testNever = `hello ${never}`
}


